package com.baizhi.service.impl;

import com.baizhi.dao.UserDao;
import com.baizhi.entity.User;
import com.baizhi.service.UserService;

public class UserServiceImpl implements UserService {
    private UserDao userDao;

    public void setUserDao(UserDao userDao) {
        this.userDao = userDao;
    }

    @Override
    public int insertUser(User u) {
        int i = userDao.insertUser(u);
        return i;
    }

    @Override
    public User selectByUsername(String username) {
        User user = userDao.selectByUsername(username);
        return user;
    }
}
